package com.itheima.spring.bestpractive.service.impl;

import com.itheima.spring.bestpractive.mapping.PermissionMapping;
import com.itheima.spring.bestpractive.pojo.Permission;
import com.itheima.spring.bestpractive.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author: HZY
 * @date: 2025/6/27 15:53
 * @Content: PermissionImpl
 */
@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermissionMapping permissionMapping;


    @Override
    public List<Permission> getPermission(long roleId) {
        return permissionMapping.hasPermission(roleId);
    }
}
